package beautiful.butterfly.drds.binlog.event.data;

import beautiful.butterfly.drds.binlog.event.EventData;
import beautiful.butterfly.drds.binlog.event.EventHeader;
import com.alibaba.fastjson.JSONObject;
import lombok.Getter;
import lombok.Setter;

import java.util.ArrayList;

public class QueryEventData implements EventData
{

    private static final long serialVersionUID = 836735581862808872L;
    @Setter
    @Getter
    private long threadId;
    @Setter
    @Getter
    private long executeTime;
    @Setter
    @Getter
    private int errorCode;
    @Setter
    @Getter
    private String database;
    @Setter
    @Getter
    private String sql;
    @Setter
    @Getter
    private EventHeader eventHeader;


    @Override
    public String toString()
    {
        return "QueryEventData [threadId=" + threadId + ", executeTime=" + executeTime + ", errorCode=" + errorCode
                + ", database=" + database + ", sql=" + sql + "]";
    }

    @Override
    public void setEventHeader(EventHeader eventHeader)
    {
        this.eventHeader = eventHeader;
    }

    @Override
    public ArrayList<JSONObject> toJson()
    {
        // TODO Auto-generated method stub
        return null;
    }

}
